package com.tuo.service.impl;

import com.tuo.beans.Usr;
import com.tuo.service.UsrService;
import com.tuo.util.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by tuo on 2016/1/15.
 */
@Service
public class UsrServiceImpl extends BaseServiceImpl<Usr> implements UsrService {
    @Override
    public Usr login(Usr usr) {
        List<Usr> usrs = super.query(usr);
        if (usrs != null && usrs.size() == 1) {
            return usrs.get(0);
        }
        return null;
    }
}
